EMPTY ARRAY

This command will empty the contents of any array.

  Syntax
EMPTY ARRAY Array Name(0)
  Parameters
Array Name(0
Integer
The name of the array followed by a pair of brackets ( ). You can also insert a value of zero, i.e. arrayname(0)

  Returns

This command does not return a value.

  Description

The array will read as having absolutely no items, and an array size of zero. When an array is completely empty, it will return a count of -1. The count refers to the number of available indexes, and so will return a count of zero when the command DIM arr(0) is used, representing the fact a single subscript is available at index zero.

  Example Code
DIM array(10)
EMPTY ARRAY array()
PRINT ARRAY COUNT(array())
WAIT KEY
  See also

CORE Commands Menu
Index